how to find average using loop in c language